﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Snow
{
    public partial class frmonggia : Form
    {
        private int screenHeight;
        private int screenWidth;
        public frmonggia()
        {
            InitializeComponent();
            screenHeight = Screen.PrimaryScreen.WorkingArea.Height;
            screenWidth = Screen.PrimaryScreen.WorkingArea.Width;
        }
        
        private void frmonggia_Load(object sender, EventArgs e){
            
            pictureBox1.Location = new Point(-pictureBox1.Width, screenHeight - pictureBox1.Height);
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            int iLeft = pictureBox1.Left;
            if (iLeft > screenWidth) iLeft = -pictureBox1.Width;
            pictureBox1.Location = new Point(iLeft + 10, screenHeight - pictureBox1.Height);
            
        }
    }
}
